home *** CD-ROM | disk | FTP | other *** search
/ CD Ware Multimedia 1995 May / cd Ware (Juegos) Epimundo.iso / DOS / TOOLS / MAKE.ZIP / MAKE.DOC < prev    next >
Encoding:
Text File  |  1985-11-23  |  3.9 KB  |  110 lines

  1. NAME
  2.      make -- maintain program groups
  3.  
  4. SYNOPSIS
  5.      make [ -fmakefile ] [ options ] [ arguments ]
  6.  
  7. DESCRIPTION
  8.      Make executes commands in a "makefile" to update one or more 
  9.      target files.  If no "-f" option is present, "MAKEFILE" is 
  10.      used as the makefile.
  11.  
  12.      Make updates a target if it depends on prerequisite files 
  13.      that have been modified since the target was last modified, 
  14.      or if the target does not exist.
  15.  
  16.      A makefile contains a sequence of entries that specify 
  17.      dependencies.  The first line of an entry contains a target 
  18.      filename, then a colon (:), then a list of space-separated 
  19.      prerequisite filenames.  All following lines that begin with 
  20.      a tab character are commands to be executed to update the 
  21.      target.  Sharp (#) and newline surround comments.
  22.  
  23.      Thus the following makefile indicates that two object files 
  24.      "foo1" and "foo2" depend on respective ".c" files and a 
  25.      common file "incl.h", and that "foo.exe" depends on both of 
  26.      the object files.
  27.  
  28.           foo1.obj : foo1.c incl.h
  29.               lc1 foo1 -b -c -i\h\ -s
  30.               lc2 foo1 -v
  31.           foo2.obj : foo2.c incl.h
  32.               lc1 foo2 -b -c -i\h\ -s
  33.               lc2 foo2 -v
  34.           foo.exe : foo1.obj foo2.obj
  35.               plink86 ou foo fi crt2s,foo1,foo2 li lib2s
  36.  
  37.      Makefile entries of the form
  38.  
  39.           string1 = string2
  40.  
  41.      are macro definitions.  Subsequent appearances of $string1 
  42.      will be replaced by string2.  All environment strings are 
  43.      entered as macros (for example, $PATH).  All non-option 
  44.      arguments are also entered as macros under the convention 
  45.      $1, $2, $#, etc.  At least 10 arguments are entered, with 
  46.      unspecified arguments entered as null strings.  The length 
  47.      of a macro definition is limited to 15 characters, and the 
  48.      length of its expansion is limited to 255 characters.  There 
  49.      is a limit of 64 macros.
  50.  
  51.      The combination of backslash (\) and newline is interpreted 
  52.      as a continuation line.
  53.  
  54.      Command lines are executed one at a time, either by spawning 
  55.      another shell (via system()) or by directly executing the 
  56.      program (via exec()).  A line is printed when a command is 
  57.      executed, unless the first character of the command is '@'.
  58.  
  59.      Commands returning non-zero status (shell commands always 
  60.      return zero) cause make to terminate unless the first 
  61.      character of the command is '-'.
  62.  
  63.      Entering an Escape character while make is working will 
  64.      cause make to terminate before examining the next target.
  65.  
  66.      Other options include:
  67.  
  68.      -i : Ignore error return values from all commands.
  69.  
  70.      -n : Trace and print, but do not execute the commands needed 
  71.           to update the targets.
  72.  
  73.      -s : Perform all commands in silent mode -- do not print any 
  74.           lines for any commands.
  75.  
  76. RETURNS
  77.      1 if some error occurred, otherwise 0.
  78.  
  79. BUGS
  80.      Macro lengths are not checked very carefully.
  81.      Both the colon in dependency lines and the equal sign in 
  82.      macro definitions must be surrounded by spaces.
  83.      Beware of lines which may inadvertently end with backslash.
  84.  
  85. FUTURES
  86.      Someday make may support two special targets:  labels and 
  87.      tests with "goto" directives.  This is the primary reason 
  88.      for not performing topological sorts.
  89.  
  90. EXAMPLE
  91.  
  92.      #
  93.      #    makefile for make
  94.      #
  95.  
  96.      make.obj : make.c
  97.          copy c:\h\stds.h c:\h\stdio.h
  98.          lc1 make -b -ic:\h\ -c
  99.          lc2 make -v
  100.  
  101.      \bin\make.exe : \lib\crt2s.obj \lib\envps.obj make.obj \lib\lib2s.lib
  102.          plink86 ou make f crt2s,envps,make li lib2s
  103.          setsiz make 5
  104.          copy make.exe \bin
  105.          del make.exe
  106. i lib2s
  107.          setsiz make 5
  108.          copy make.exe \bin
  109.          del make.exe
  110.